package com.xhcl.web.controller.system;


import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.xhcl.common.annotation.Log;
import com.xhcl.common.enums.BusinessType;
import com.xhcl.system.domain.TSrhsDcqrmx;
import com.xhcl.system.service.ITSrhsDcqrmxService;
import com.xhcl.common.core.controller.BaseController;
import com.xhcl.common.core.domain.AjaxResult;
import com.xhcl.framework.uitls.poi.ExcelUtil;
import com.xhcl.common.core.page.TableDataInfo;

/**
 * 单位待查确认明细查询Controller
 * 
 * @author xhcl
 * @date 2020-08-30
 */
@Controller
@RequestMapping("/system/dcqrmx")
public class TSrhsDcqrmxController extends BaseController
{
    private String prefix = "system/dcqrmx";

    @Autowired
    private ITSrhsDcqrmxService tSrhsDcqrmxService;

    @RequiresPermissions("system:dcqrmx:view")
    @GetMapping()
    public String dcqrmx()
    {
        return prefix + "/dcqrmx";
    }

    /**
     * 查询单位待查确认明细查询列表
     */
    @RequiresPermissions("system:dcqrmx:list")
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(TSrhsDcqrmx tSrhsDcqrmx)
    {
        startPage();
        List<TSrhsDcqrmx> list = tSrhsDcqrmxService.selectTSrhsDcqrmxList(tSrhsDcqrmx);
        return getDataTable(list);
    }

    /**
     * 导出单位待查确认明细查询列表
     */
    @RequiresPermissions("system:dcqrmx:export")
    @Log(title = "单位待查确认明细查询", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    @ResponseBody
    public AjaxResult export(TSrhsDcqrmx tSrhsDcqrmx)
    {
        List<TSrhsDcqrmx> list = tSrhsDcqrmxService.selectTSrhsDcqrmxList(tSrhsDcqrmx);
        ExcelUtil<TSrhsDcqrmx> util = new ExcelUtil<TSrhsDcqrmx>(TSrhsDcqrmx.class);
        return util.exportExcel(list, "dcqrmx");
    }
}
